package com.binest.util;

import java.util.Random;

/**
 * 生成随机数工具类
 */
public class RandomUtil {
    /**
     *
     * @return
     */
    public static String runNumber() {
//        String str="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        String str="0123456789";
        StringBuilder sb=new StringBuilder();
        for(int i=0;i<6;i++)
        {
            char ch=str.charAt(new Random().nextInt(str.length()));
            sb.append(ch);
        }
        System.out.println(sb.toString());
        String code = sb.toString();
        return code;
    }
}
